import { defHttp } from '/@/utils/http/axios';
import { ContentTypeEnum } from '/@/enums/httpEnum';

enum Api {
  getbudgetPage = '/admin-api/bpm/budget-application/page',
  addbudget = '/admin-api/bpm/budget-application/create',
  getbudget = '/admin-api/bpm/budget-application/get',
  budgetDelete = '/admin-api/bpm/budget-application/delete',
}

/**
 * @description: 预算
 */
export const getBudgetPage = (params: any) => {
  return defHttp.get<any>({ url: Api.getbudgetPage, params });
};
export const addBudget = (params: any) => {
  return defHttp.post<any>({ url: Api.addbudget, params });
};
export const getbudget = (params: any) => {
  return defHttp.get<any>({ url: Api.getbudget, params });
};
export const budgetDelete = (params: any) => {
  return defHttp.delete<any>(
    {
      url: Api.budgetDelete,
      params,
      headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
    },
    { joinParamsToUrl: true },
  );
};
